﻿using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using NewsletterCreator;

public partial class _Default : System.Web.UI.Page 
{
    NumberedNewsletterItem numItem;
    DatedNewsletterItem dateItem;

    protected void Page_Init(object sender, EventArgs e)
    {
        DatabaseAccess accessor = new DatabaseAccess();
        
            numItem = new NumberedNewsletterItem();
            numItem.Title = "Announcements";
            numItem.Text = "Left";
            numItem.Datasource = accessor.getAllAnnouncements(1).Tables[0];

            NewsletterGenerator2.AddPanelControl(numItem, 0);

            dateItem = new DatedNewsletterItem();
            dateItem.Title = "Upcoming Events";
            dateItem.Text = "Right";
            dateItem.Datasource = accessor .getAllEvents(1).Tables[0];
            dateItem.DatasourceDateColumn = 3;

            NewsletterGenerator2.AddPanelControl(dateItem, 1);
        
    }
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
